package com.szu.subject.domains;

import java.util.List;


/**
 * 用户
 * 
 * @author ShenXiaolin
 *
 */
public class User extends BaseModel  {

	private String account;// 账号：教职工为工号，学生为学号
	private String name;// 名字
	private String password;// 密码
	private Short status;// 状态：有效=0，无效（过期）=1，休学（外派）=2
	private String role;
	
	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Short getStatus() {
		return status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	public boolean isEnable() {
		return status == 0;
	}
	
	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public boolean equals(User user) {
		if (user.getAccount().equals(account)) {
			return true;
		} else {
			return false;
		}
	}

	public int hashcode() {
		return super.hashCode();
	}

}
